function del(url){
	$.messager.confirm('删除记录', '确定删除该记录吗?', function(r){
		if (r){
			location.href=url;
		}
	}); 
}

function openDialogOne(title,url){
	var horizontalPadding = 30;
	var verticalPadding = 30;
	$('<iframe id="externalSite" src="' + url + '" />').dialog({
	    title: title,
	    autoOpen: true,
	    width: 600,
	    height: 350,
	    modal: true,
	    resizable: true,
	    autoResize: true,
	    overlay: {
	        opacity: 0.3,
	        background: "black"
	    }
	}).width(600 - horizontalPadding).height(350 - verticalPadding);	
}

function openDialog(title,url){
	alert(title);
	var diag = new Dialog("Diag2");
	diag.Width = 900;
	diag.Height = 400;
	diag.Title = title;
	diag.URL = url;
	diag.show();
}

function iFrameHeight() {   
	var ifm= $("#list");   
	var subWeb = document.frames ? document.frames["list"].document : ifm.contentDocument;   
	if(ifm != null && subWeb != null) {
	   ifm.height = subWeb.body.scrollHeight;
	}   
}

function setIframeHeight() {	
	var h = $("#positionBtm").height();
	$(window.frames["list"].document).find(".title_page").css("bottom",(h+36));
} 

function createColumnMenu(){
	var tmenu = $('<div id="tmenu" style="width:100px;"></div>').appendTo('body');
	var fields = $('#tt').datagrid('getColumnFields');
	for(var i=0; i<fields.length; i++){
		$('<div iconCls="icon-ok"/>').html(fields[i]).appendTo(tmenu);
	}
	tmenu.menu({
		onClick: function(item){
			if (item.iconCls=='icon-ok'){
				$('#tt').datagrid('hideColumn', item.text);
				tmenu.menu('setIcon', {
					target: item.target,
					iconCls: 'icon-empty'
				});
			} else {
				$('#tt').datagrid('showColumn', item.text);
				tmenu.menu('setIcon', {
					target: item.target,
					iconCls: 'icon-ok'
				});
			}
		}
	});
}
function downLoad(obj,id){
	if(obj.checked){
		alert("此处添加选中后要处理的业务逻辑！");
	}	
}
$(function() {
	//$('tbody > tr:odd', $('#content_1')).toggleClass('evenColor');
	$('tbody > tr', $('#content_1')).click(function(){
		$('.selected').removeClass('selected');					
		$(this).addClass('selected'); 
	}).hover(
		function(){
			$(this).addClass('move');
		},
		function(){
			$(this).removeClass('move');
		}
	);

	/*$(":input[class='date']").datepicker({
		showOn: "button",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true,
		changeMonth: true,
		changeYear: true,	
		dateFormat:'yy-mm-dd'
	});*/
});